package com.myplaylist.android.utils;

import java.util.TimerTask;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

public class TrackHandlerTask extends TimerTask {

	private Handler handler;
	private String title;
	private String author;

	public TrackHandlerTask(Handler handler, String author, String title) {
		this.handler = handler;
		this.author = author;
		this.title = title;
	}
	
	@Override
	public void run() {
		Message msg = new Message();
		Bundle bundle = new Bundle();
		bundle.putString(Constants.KEY_AUTHOR, author);
		bundle.putString(Constants.KEY_TITLE, title);
		msg.setData(bundle);
		handler.sendMessage(msg);
	}

}
